import UserType from "./userType";
import Permission from "./permission";

let SideBarItem = {};

SideBarItem.items = [
  {
    icon: "el-icon-fa fa-bar-chart",
    index: "/admin",
    title: "管理员首页",
    userType: UserType.admin,
    permission: Permission.no
  },
  {
    icon: "el-icon-fa fa-user",
    index: "/admin/student",
    title: "学生管理",
    userType: UserType.admin,
    permission: Permission.student
  },
  {
    icon: "el-icon-fa fa-student",
    index: "/admin/student",
    title: "小组管理",
    userType: UserType.admin,
    permission: Permission.class
  },
  {
    icon: "el-icon-fa fa-user-plus",
    index: "/admin/goods",
    title: "教师管理",
    userType: UserType.admin,
    permission: Permission.teacher
  },
  {
    icon: "el-icon-fa fa-book",
    index: "/admin/module",
    title: "模块管理",
    userType: UserType.admin,
    permission: Permission.course
  },
  {
    icon: "el-icon-fa fa-edit",
    index: "/admin/testfile",
    title: "脚本管理",
    userType: UserType.admin,
    permission: Permission.studentCourse
  },
  {
    icon: "el-icon-date",
    index: "/admin/term",
    title: "学期管理",
    userType: UserType.admin,
    permission: Permission.admin
  },
  {
    icon: "el-icon-fa fa-bar-chart",
    index: "/student/home",
    title: "用户首页",
    userType: UserType.student,
    permission: Permission.student
  },
  {
    icon: "el-icon-upload",
    index: "/student/upload",//不可以直接写成"student/upload"，会出现跳转错误
    title: "代码上传",
    userType: UserType.student,
    permission: Permission.student
  },
  {
    icon: "el-icon-upload",
    index: "/student/test",
    title: "代码测试",
    userType: UserType.student,
    permission: Permission.student
  },
  {
    icon: "el-icon-upload",
    index: "/student/result",
    title: "测试结果",
    userType: UserType.student,
    permission: Permission.student
  },
  {
    icon: "el-icon-fa fa-bar-chart",
    index: "/goods/home",
    title: "教师首页",
    userType: UserType.teacher,
    permission: Permission.teacher
  },
  {
    icon: "el-icon-fa fa-student",
    index: "/goods/student",
    title: "小组管理",
    userType: UserType.teacher,
    permission: Permission.teacher
  },
  {
    icon: "el-icon-fa fa-student",
    index: "/goods/test",
    title: "代码测试",
    userType: UserType.teacher,
    permission: Permission.teacher
  },
  {
    icon: "el-icon-fa fa-student",
    index: "/goods/checkDuplicate",
    title: "代码查重",
    userType: UserType.teacher,
    permission: Permission.teacher
  },
  {
    icon: "el-icon-fa fa-student",
    index: "/goods/rapport",
    title: "报表",
    userType: UserType.teacher,
    permission: Permission.teacher
  },
];

export default SideBarItem;
